{% extends 'myadmin/base.html' %}

{% block content %}
    <section class="content-header">
        <h4>
            信息提示：
            <span class="tishi">5秒后自动跳转页面</span>
        </h4>
    </section>
    <div class="pad margin no-print">
        <div class="callout callout-info" style="margin-bottom: 0!important;padding-left: 50px">
            <h3><i class="fa fa-exclamation-triangle"></i>&nbsp; {{ info }}</h3>
        </div>
    </div>
{% endblock %}
{% block js %}
    <script>
        const tishi = document.querySelector('.tishi')

        let i = 5
        let num = setInterval(function () {
            i--
            tishi.innerHTML = `${i}秒后自动跳转页面`
            if (i === 0) {
                clearInterval(num)
                // 解开禁用
                {#btn.disabled = false#}
                // 修改内容
                window.location.href = "{% url 'myadmin_user_index' 1 %}"
            }

        }, 1000)
    </script>
{% endblock %}
